.TH stoker_do 8 "17 September 2008" "version 0.91" "Stoker Manual"
.SH NAME
stoker (exec) \- remote command execution
.SH SYNOPSIS
.B stoker
[OPTIONS] <machine(s)> do <command> [arguments]

.B stoker
<\-a | \-\-all> [OPTIONS] do <command> [arguments]
.SH DESCRIPTION
The stoker(8) do command executes a local command (i.e. on the same host on
which the stoker command is being run) for every specified target machine.
The required <command> specifies the command to be run, including path
information if needed.
Arguments to the <command> are optional.
If one or more remaining arguments is the keyword `%target', then that keyword
will be replaced by the name of the target machine (resolved either to hostname
or IP address, as specified in stoker.conf(5)).
Similarly, `%target.hostname', `%target.mac', and `%target.ipv4', when used
as arguments to the <command>, will be replaced by the hostname, MAC address,
and IPv4 address of the host, respectively.
If the machine source is missing information, such as the MAC address for
a machine, then the corresponding %target item will be replaced by an explicit
empty string argument.
Unlike the stoker exec command (stoker_exec(8)), the do command does NOT
provide an explicit script option.
Instead, a shell script on the local system is simply specified as <command>.
Global OPTIONS are documented in the man page for stoker(8).
.SH EXAMPLES
.TP
Check DNS information for machines foo and bar:
.B stoker foo,bar do nslookup %target
.TP
Run a traceroute to each target machine:
.B stoker -a do traceroute %target
.SH EXIT STATUS
Stoker will return a zero exit status if all commands invoked by "do" return
zero.
Otherwise, a non-zero exit code will be returned, the exact value of
which will depend upon the return code of the command invoked by "do".
.SH SEE ALSO
stoker_exec(8), stoker.conf(5)
.SH AUTHOR
Mike Murphy (mamurph@cs.clemson.edu)
.SH DISCLAIMER
This material is based upon work supported under a National Science
Foundation Graduate Research Fellowship.
Any opinions, findings, conclusions or recommendations expressed in this
publication are those of the author(s) and do not necessarily reflect the
views of the National Science Foundation.
